﻿namespace HRM.CORE
{
    using DevExpress.Utils;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraTab;
    using APP.HELPER;
    using Common.Class; using APP.HELPER.Utils.Language; using Security.Security; using Dictionary.ERP;
    using HRM.CORE;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms; using Common;
    using Extra.ERP;
    using Security.ERP;

    public class xucWelfareAdd : Common.xucBaseAddH
    {
        private CalcEdit calMoneyAllCompany;
        private CalcEdit calMoneyAllEmployee;
        private CalcEdit calMoneyAllTotal;
        private CalcEdit calMoneyOneCompany;
        private CalcEdit calMoneyOneEmployee;
        private CalcEdit calMoneyOneTotal;
        private CalcEdit calMoneyTotal;
        private CalcEdit calQuantity;
        private ComboBoxEdit cboStatus;
        private IContainer components = null;
        private DateEdit dtPerformFromDate;
        private DateEdit dtPerformToDate;
        private DateEdit dtPrepareFromDate;
        private DateEdit dtPrepareToDate;
        private DateEdit dtRegisterFromDate;
        private DateEdit dtRegisterToDate;
        private GroupControl groupControl1;
        private GroupControl groupControl2;
        private GroupControl groupControl3;
        private GroupControl groupControl4;
        private GroupControl groupControl5;
        private GroupControl groupControl6;
        private LabelControl labelControl1;
        private LabelControl labelControl10;
        private LabelControl labelControl11;
        private LabelControl labelControl12;
        private LabelControl labelControl13;
        private LabelControl labelControl14;
        private LabelControl labelControl15;
        private LabelControl labelControl16;
        private LabelControl labelControl17;
        private LabelControl labelControl18;
        private LabelControl labelControl19;
        private LabelControl labelControl2;
        private LabelControl labelControl20;
        private LabelControl labelControl21;
        private LabelControl labelControl22;
        private LabelControl labelControl23;
        private LabelControl labelControl24;
        private LabelControl labelControl25;
        private LabelControl labelControl26;
        private LabelControl labelControl27;
        private LabelControl labelControl28;
        private LabelControl labelControl29;
        private LabelControl labelControl3;
        private LabelControl labelControl30;
        private LabelControl labelControl31;
        private LabelControl labelControl4;
        private LabelControl labelControl5;
        private LabelControl labelControl6;
        private LabelControl labelControl7;
        private LabelControl labelControl8;
        private LabelControl labelControl9;
        private MemoEdit txtDescription;
        private MemoEdit txtForm;
        private TextEdit txtID;
        private TextEdit txtLocation;
        private TextEdit txtName;
        private MemoEdit txtPartnerAddress;
        private TextEdit txtPartnerName;
        private TextEdit txtPartnerPhone;
        private MemoEdit txtPersonAddress;
        private TextEdit txtPersonEmail;
        private TextEdit txtPersonName;
        private TextEdit txtPersonPhone;
        private TextEdit txtPersonPosition;
        private MemoEdit txtPurpose;
        private XtraTabControl xtraTabControl1;
        private XtraTabPage xtraTabPage1;
        private XtraTabPage xtraTabPage2;
        private XtraTabPage xtraTabPage3;

        public event SuccessEventHander Success;

        public xucWelfareAdd()
        {
            this.InitializeComponent();
            this.InitComponent();
        }

        protected override void Add()
        {
            base.Add();
            this.txtID.Text = new HRM_WELFARE().NewID();
            this.txtName.Focus();
        }

        public void Clear()
        {
            this.dtPrepareFromDate.DateTime = System.DateTime.Now;
            this.dtPrepareToDate.DateTime = System.DateTime.Now;
            this.dtRegisterFromDate.DateTime = System.DateTime.Now;
            this.dtRegisterToDate.DateTime = System.DateTime.Now;
            this.dtPerformFromDate.DateTime = System.DateTime.Now;
            this.dtPerformToDate.DateTime = System.DateTime.Now;
            this.calQuantity.EditValue = 0;
            this.calMoneyTotal.EditValue = 0;
            this.calMoneyOneEmployee.EditValue = 0;
            this.calMoneyOneCompany.EditValue = 0;
            this.calMoneyOneTotal.EditValue = 0;
            this.calMoneyAllEmployee.EditValue = 0;
            this.calMoneyAllCompany.EditValue = 0;
            this.calMoneyAllTotal.EditValue = 0;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        protected override void Init()
        {
        }

        private void InitComponent()
        {
            this.dtPrepareFromDate.DateTime = System.DateTime.Now;
            this.dtPrepareToDate.DateTime = System.DateTime.Now;
            this.dtRegisterFromDate.DateTime = System.DateTime.Now;
            this.dtRegisterToDate.DateTime = System.DateTime.Now;
            this.dtPerformFromDate.DateTime = System.DateTime.Now;
            this.dtPerformToDate.DateTime = System.DateTime.Now;
            this.calQuantity.EditValue = 0;
            this.calMoneyTotal.EditValue = 0;
            this.calMoneyOneEmployee.EditValue = 0;
            this.calMoneyOneCompany.EditValue = 0;
            this.calMoneyOneTotal.EditValue = 0;
            this.calMoneyAllEmployee.EditValue = 0;
            this.calMoneyAllCompany.EditValue = 0;
            this.calMoneyAllTotal.EditValue = 0;
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(xucWelfareAdd));
            this.xtraTabControl1 = new XtraTabControl();
            this.xtraTabPage1 = new XtraTabPage();
            this.labelControl31 = new LabelControl();
            this.txtPurpose = new MemoEdit();
            this.groupControl3 = new GroupControl();
            this.labelControl8 = new LabelControl();
            this.dtPerformFromDate = new DateEdit();
            this.dtPerformToDate = new DateEdit();
            this.labelControl7 = new LabelControl();
            this.groupControl2 = new GroupControl();
            this.labelControl6 = new LabelControl();
            this.dtRegisterFromDate = new DateEdit();
            this.dtRegisterToDate = new DateEdit();
            this.labelControl5 = new LabelControl();
            this.groupControl1 = new GroupControl();
            this.dtPrepareFromDate = new DateEdit();
            this.dtPrepareToDate = new DateEdit();
            this.labelControl3 = new LabelControl();
            this.labelControl4 = new LabelControl();
            this.labelControl11 = new LabelControl();
            this.labelControl10 = new LabelControl();
            this.labelControl9 = new LabelControl();
            this.txtForm = new MemoEdit();
            this.txtDescription = new MemoEdit();
            this.labelControl2 = new LabelControl();
            this.labelControl1 = new LabelControl();
            this.txtName = new TextEdit();
            this.txtID = new TextEdit();
            this.txtLocation = new TextEdit();
            this.xtraTabPage2 = new XtraTabPage();
            this.labelControl30 = new LabelControl();
            this.labelControl29 = new LabelControl();
            this.calMoneyTotal = new CalcEdit();
            this.labelControl15 = new LabelControl();
            this.labelControl13 = new LabelControl();
            this.calQuantity = new CalcEdit();
            this.groupControl5 = new GroupControl();
            this.labelControl26 = new LabelControl();
            this.labelControl27 = new LabelControl();
            this.labelControl28 = new LabelControl();
            this.calMoneyAllTotal = new CalcEdit();
            this.calMoneyAllCompany = new CalcEdit();
            this.calMoneyAllEmployee = new CalcEdit();
            this.groupControl4 = new GroupControl();
            this.labelControl25 = new LabelControl();
            this.labelControl24 = new LabelControl();
            this.labelControl14 = new LabelControl();
            this.calMoneyOneTotal = new CalcEdit();
            this.calMoneyOneCompany = new CalcEdit();
            this.calMoneyOneEmployee = new CalcEdit();
            this.xtraTabPage3 = new XtraTabPage();
            this.groupControl6 = new GroupControl();
            this.labelControl23 = new LabelControl();
            this.labelControl22 = new LabelControl();
            this.txtPersonEmail = new TextEdit();
            this.labelControl19 = new LabelControl();
            this.txtPersonPhone = new TextEdit();
            this.labelControl20 = new LabelControl();
            this.labelControl21 = new LabelControl();
            this.txtPersonPosition = new TextEdit();
            this.txtPersonName = new TextEdit();
            this.txtPersonAddress = new MemoEdit();
            this.labelControl18 = new LabelControl();
            this.labelControl16 = new LabelControl();
            this.labelControl17 = new LabelControl();
            this.txtPartnerPhone = new TextEdit();
            this.txtPartnerName = new TextEdit();
            this.txtPartnerAddress = new MemoEdit();
            this.labelControl12 = new LabelControl();
            this.cboStatus = new ComboBoxEdit();
            ((ISupportInitialize) base.Err).BeginInit();
            base.imageCollection2.BeginInit();
            this.xtraTabControl1.BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.xtraTabPage1.SuspendLayout();
            this.txtPurpose.Properties.BeginInit();
            this.groupControl3.BeginInit();
            this.groupControl3.SuspendLayout();
            this.dtPerformFromDate.Properties.VistaTimeProperties.BeginInit();
            this.dtPerformFromDate.Properties.BeginInit();
            this.dtPerformToDate.Properties.VistaTimeProperties.BeginInit();
            this.dtPerformToDate.Properties.BeginInit();
            this.groupControl2.BeginInit();
            this.groupControl2.SuspendLayout();
            this.dtRegisterFromDate.Properties.VistaTimeProperties.BeginInit();
            this.dtRegisterFromDate.Properties.BeginInit();
            this.dtRegisterToDate.Properties.VistaTimeProperties.BeginInit();
            this.dtRegisterToDate.Properties.BeginInit();
            this.groupControl1.BeginInit();
            this.groupControl1.SuspendLayout();
            this.dtPrepareFromDate.Properties.VistaTimeProperties.BeginInit();
            this.dtPrepareFromDate.Properties.BeginInit();
            this.dtPrepareToDate.Properties.VistaTimeProperties.BeginInit();
            this.dtPrepareToDate.Properties.BeginInit();
            this.txtForm.Properties.BeginInit();
            this.txtDescription.Properties.BeginInit();
            this.txtName.Properties.BeginInit();
            this.txtID.Properties.BeginInit();
            this.txtLocation.Properties.BeginInit();
            this.xtraTabPage2.SuspendLayout();
            this.calMoneyTotal.Properties.BeginInit();
            this.calQuantity.Properties.BeginInit();
            this.groupControl5.BeginInit();
            this.groupControl5.SuspendLayout();
            this.calMoneyAllTotal.Properties.BeginInit();
            this.calMoneyAllCompany.Properties.BeginInit();
            this.calMoneyAllEmployee.Properties.BeginInit();
            this.groupControl4.BeginInit();
            this.groupControl4.SuspendLayout();
            this.calMoneyOneTotal.Properties.BeginInit();
            this.calMoneyOneCompany.Properties.BeginInit();
            this.calMoneyOneEmployee.Properties.BeginInit();
            this.xtraTabPage3.SuspendLayout();
            this.groupControl6.BeginInit();
            this.groupControl6.SuspendLayout();
            this.txtPersonEmail.Properties.BeginInit();
            this.txtPersonPhone.Properties.BeginInit();
            this.txtPersonPosition.Properties.BeginInit();
            this.txtPersonName.Properties.BeginInit();
            this.txtPersonAddress.Properties.BeginInit();
            this.txtPartnerPhone.Properties.BeginInit();
            this.txtPartnerName.Properties.BeginInit();
            this.txtPartnerAddress.Properties.BeginInit();
            this.cboStatus.Properties.BeginInit();
            base.SuspendLayout();
            base.btnSave.Location = new Point(0x115, 0x181);
            base.btnSave.TabIndex = 3;
            base.btnCancel.Location = new Point(0x1dd, 0x181);
            base.btnCancel.TabIndex = 5;
            base.btnSaveNew.Location = new Point(0x178, 0x181);
            base.btnSaveNew.TabIndex = 4;
            base.imageCollection2.ImageStream = (ImageCollectionStreamer) manager.GetObject("imageCollection2.ImageStream");
            this.xtraTabControl1.Dock = DockStyle.Top;
            this.xtraTabControl1.HeaderButtons = TabButtons.Default | TabButtons.Next | TabButtons.Prev;
            this.xtraTabControl1.HeaderButtonsShowMode = TabButtonShowMode.Always;
            this.xtraTabControl1.ImeMode = ImeMode.NoControl;
            this.xtraTabControl1.Location = new Point(0, 2);
            this.xtraTabControl1.Name = "xtraTabControl1";
            this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1;
            this.xtraTabControl1.Size = new Size(0x249, 0x17a);
            this.xtraTabControl1.TabIndex = 0;
            this.xtraTabControl1.TabPages.AddRange(new XtraTabPage[] { this.xtraTabPage1, this.xtraTabPage2, this.xtraTabPage3 });
            this.xtraTabPage1.Controls.Add(this.labelControl31);
            this.xtraTabPage1.Controls.Add(this.txtPurpose);
            this.xtraTabPage1.Controls.Add(this.groupControl3);
            this.xtraTabPage1.Controls.Add(this.groupControl2);
            this.xtraTabPage1.Controls.Add(this.groupControl1);
            this.xtraTabPage1.Controls.Add(this.labelControl11);
            this.xtraTabPage1.Controls.Add(this.labelControl10);
            this.xtraTabPage1.Controls.Add(this.labelControl9);
            this.xtraTabPage1.Controls.Add(this.txtForm);
            this.xtraTabPage1.Controls.Add(this.txtDescription);
            this.xtraTabPage1.Controls.Add(this.labelControl2);
            this.xtraTabPage1.Controls.Add(this.labelControl1);
            this.xtraTabPage1.Controls.Add(this.txtName);
            this.xtraTabPage1.Controls.Add(this.txtID);
            this.xtraTabPage1.Controls.Add(this.txtLocation);
            this.xtraTabPage1.Name = "xtraTabPage1";
            this.xtraTabPage1.Size = new Size(0x242, 0x15d);
            this.xtraTabPage1.Text = "Th\x00f4ng Tin Chung";
            this.labelControl31.Appearance.Options.UseTextOptions = true;
            this.labelControl31.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl31.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl31.Location = new Point(15, 0xb2);
            this.labelControl31.Name = "labelControl31";
            this.labelControl31.Size = new Size(0x3d, 0x1c);
            this.labelControl31.TabIndex = 8;
            this.labelControl31.Text = "Mục đ\x00edch:";
            this.txtPurpose.Location = new Point(0x4d, 0xaf);
            this.txtPurpose.Name = "txtPurpose";
            this.txtPurpose.Size = new Size(0x1ed, 0x29);
            this.txtPurpose.TabIndex = 9;
            this.groupControl3.Controls.Add(this.labelControl8);
            this.groupControl3.Controls.Add(this.dtPerformFromDate);
            this.groupControl3.Controls.Add(this.dtPerformToDate);
            this.groupControl3.Controls.Add(this.labelControl7);
            this.groupControl3.Location = new Point(0x182, 0xfe);
            this.groupControl3.Name = "groupControl3";
            this.groupControl3.Size = new Size(0xb8, 0x55);
            this.groupControl3.TabIndex = 14;
            this.groupControl3.Text = "Thời gian thực hiện";
            this.labelControl8.Location = new Point(5, 0x1c);
            this.labelControl8.Name = "labelControl8";
            this.labelControl8.Size = new Size(0x2c, 13);
            this.labelControl8.TabIndex = 0;
            this.labelControl8.Text = "Từ ng\x00e0y:";
            this.dtPerformFromDate.EditValue = null;
            this.dtPerformFromDate.Location = new Point(0x40, 0x1a);
            this.dtPerformFromDate.Name = "dtPerformFromDate";
            this.dtPerformFromDate.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.dtPerformFromDate.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.dtPerformFromDate.Size = new Size(0x6a, 20);
            this.dtPerformFromDate.TabIndex = 1;
            this.dtPerformToDate.EditValue = null;
            this.dtPerformToDate.Location = new Point(0x40, 0x34);
            this.dtPerformToDate.Name = "dtPerformToDate";
            this.dtPerformToDate.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.dtPerformToDate.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.dtPerformToDate.Size = new Size(0x6a, 20);
            this.dtPerformToDate.TabIndex = 3;
            this.labelControl7.Location = new Point(6, 0x36);
            this.labelControl7.Name = "labelControl7";
            this.labelControl7.Size = new Size(0x33, 13);
            this.labelControl7.TabIndex = 2;
            this.labelControl7.Text = "Đến ng\x00e0y:";
            this.groupControl2.Controls.Add(this.labelControl6);
            this.groupControl2.Controls.Add(this.dtRegisterFromDate);
            this.groupControl2.Controls.Add(this.dtRegisterToDate);
            this.groupControl2.Controls.Add(this.labelControl5);
            this.groupControl2.Location = new Point(0xca, 0xfe);
            this.groupControl2.Name = "groupControl2";
            this.groupControl2.Size = new Size(0xb0, 0x55);
            this.groupControl2.TabIndex = 13;
            this.groupControl2.Text = "Thời gian đăng k\x00fd";
            this.labelControl6.Location = new Point(5, 0x1c);
            this.labelControl6.Name = "labelControl6";
            this.labelControl6.Size = new Size(0x2c, 13);
            this.labelControl6.TabIndex = 0;
            this.labelControl6.Text = "Từ ng\x00e0y:";
            this.dtRegisterFromDate.EditValue = null;
            this.dtRegisterFromDate.Location = new Point(0x3b, 0x19);
            this.dtRegisterFromDate.Name = "dtRegisterFromDate";
            this.dtRegisterFromDate.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.dtRegisterFromDate.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.dtRegisterFromDate.Size = new Size(0x6a, 20);
            this.dtRegisterFromDate.TabIndex = 1;
            this.dtRegisterToDate.EditValue = null;
            this.dtRegisterToDate.Location = new Point(0x3b, 0x33);
            this.dtRegisterToDate.Name = "dtRegisterToDate";
            this.dtRegisterToDate.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.dtRegisterToDate.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.dtRegisterToDate.Size = new Size(0x6a, 20);
            this.dtRegisterToDate.TabIndex = 3;
            this.labelControl5.Location = new Point(6, 0x36);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new Size(0x33, 13);
            this.labelControl5.TabIndex = 2;
            this.labelControl5.Text = "Đến ng\x00e0y:";
            this.groupControl1.Controls.Add(this.dtPrepareFromDate);
            this.groupControl1.Controls.Add(this.dtPrepareToDate);
            this.groupControl1.Controls.Add(this.labelControl3);
            this.groupControl1.Controls.Add(this.labelControl4);
            this.groupControl1.Location = new Point(13, 0xfe);
            this.groupControl1.Name = "groupControl1";
            this.groupControl1.Size = new Size(0xb5, 0x55);
            this.groupControl1.TabIndex = 12;
            this.groupControl1.Text = "Thời gian dự kiến";
            this.dtPrepareFromDate.EditValue = null;
            this.dtPrepareFromDate.Location = new Point(0x40, 0x19);
            this.dtPrepareFromDate.Name = "dtPrepareFromDate";
            this.dtPrepareFromDate.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.dtPrepareFromDate.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.dtPrepareFromDate.Size = new Size(0x6a, 20);
            this.dtPrepareFromDate.TabIndex = 1;
            this.dtPrepareToDate.EditValue = null;
            this.dtPrepareToDate.Location = new Point(0x40, 0x33);
            this.dtPrepareToDate.Name = "dtPrepareToDate";
            this.dtPrepareToDate.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.dtPrepareToDate.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.dtPrepareToDate.Size = new Size(0x6a, 20);
            this.dtPrepareToDate.TabIndex = 3;
            this.labelControl3.Location = new Point(8, 0x1c);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new Size(0x2c, 13);
            this.labelControl3.TabIndex = 0;
            this.labelControl3.Text = "Từ ng\x00e0y:";
            this.labelControl4.Location = new Point(9, 0x36);
            this.labelControl4.Name = "labelControl4";
            this.labelControl4.Size = new Size(0x33, 13);
            this.labelControl4.TabIndex = 2;
            this.labelControl4.Text = "Đến ng\x00e0y:";
            this.labelControl11.Location = new Point(14, 0xe2);
            this.labelControl11.Name = "labelControl11";
            this.labelControl11.Size = new Size(0x2d, 13);
            this.labelControl11.TabIndex = 10;
            this.labelControl11.Text = "Địa điểm:";
            this.labelControl10.Appearance.Options.UseTextOptions = true;
            this.labelControl10.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl10.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl10.Location = new Point(14, 0x75);
            this.labelControl10.Name = "labelControl10";
            this.labelControl10.Size = new Size(0x3d, 0x1c);
            this.labelControl10.TabIndex = 6;
            this.labelControl10.Text = "H\x00ecnh thức thực hiện:";
            this.labelControl9.Location = new Point(14, 0x38);
            this.labelControl9.Name = "labelControl9";
            this.labelControl9.Size = new Size(0x1f, 13);
            this.labelControl9.TabIndex = 4;
            this.labelControl9.Text = "M\x00f4 tả:";
            this.txtForm.Location = new Point(0x4d, 0x71);
            this.txtForm.Name = "txtForm";
            this.txtForm.Size = new Size(0x1ed, 0x37);
            this.txtForm.TabIndex = 7;
            this.txtDescription.Location = new Point(0x4d, 0x31);
            this.txtDescription.Name = "txtDescription";
            this.txtDescription.Size = new Size(0x1ed, 0x39);
            this.txtDescription.TabIndex = 5;
            this.labelControl2.Appearance.Options.UseTextOptions = true;
            this.labelControl2.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl2.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl2.Location = new Point(0xc2, 0x16);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new Size(0x41, 0x18);
            this.labelControl2.TabIndex = 2;
            this.labelControl2.Text = "T\x00ean chương tr\x00ecnh (*):";
            this.labelControl1.Appearance.Options.UseTextOptions = true;
            this.labelControl1.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl1.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl1.Location = new Point(14, 20);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new Size(0x3d, 0x1a);
            this.labelControl1.TabIndex = 0;
            this.labelControl1.Text = "M\x00e3 chương tr\x00ecnh (*):";
            this.txtName.Location = new Point(0x106, 0x15);
            this.txtName.Name = "txtName";
            this.txtName.Size = new Size(0x134, 20);
            this.txtName.TabIndex = 3;
            this.txtID.Location = new Point(0x4d, 0x15);
            this.txtID.Name = "txtID";
            this.txtID.Size = new Size(110, 20);
            this.txtID.TabIndex = 1;
            this.txtID.EditValueChanged += new EventHandler(this.txtID_EditValueChanged);
            this.txtLocation.Location = new Point(0x4d, 0xe0);
            this.txtLocation.Name = "txtLocation";
            this.txtLocation.Size = new Size(0x1ed, 20);
            this.txtLocation.TabIndex = 11;
            this.xtraTabPage2.Controls.Add(this.labelControl30);
            this.xtraTabPage2.Controls.Add(this.labelControl29);
            this.xtraTabPage2.Controls.Add(this.calMoneyTotal);
            this.xtraTabPage2.Controls.Add(this.labelControl15);
            this.xtraTabPage2.Controls.Add(this.labelControl13);
            this.xtraTabPage2.Controls.Add(this.calQuantity);
            this.xtraTabPage2.Controls.Add(this.groupControl5);
            this.xtraTabPage2.Controls.Add(this.groupControl4);
            this.xtraTabPage2.Name = "xtraTabPage2";
            this.xtraTabPage2.Size = new Size(0x242, 0x15d);
            this.xtraTabPage2.Text = "Chi Ph\x00ed Thực Hiện";
            this.labelControl30.Location = new Point(0xae, 0x12);
            this.labelControl30.Name = "labelControl30";
            this.labelControl30.Size = new Size(0x1f, 13);
            this.labelControl30.TabIndex = 2;
            this.labelControl30.Text = "người.";
            this.labelControl29.Location = new Point(0x1a9, 0x12);
            this.labelControl29.Name = "labelControl29";
            this.labelControl29.Size = new Size(0x15, 13);
            this.labelControl29.TabIndex = 5;
            this.labelControl29.Text = "VNĐ";
            this.calMoneyTotal.Location = new Point(0x13f, 15);
            this.calMoneyTotal.Name = "calMoneyTotal";
            this.calMoneyTotal.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calMoneyTotal.Properties.DisplayFormat.FormatString = "{0}";
            this.calMoneyTotal.Properties.EditFormat.FormatString = "{0}";
            this.calMoneyTotal.Properties.Mask.UseMaskAsDisplayFormat = true;
            this.calMoneyTotal.Size = new Size(100, 20);
            this.calMoneyTotal.TabIndex = 4;
            this.labelControl15.Location = new Point(0xe8, 0x12);
            this.labelControl15.Name = "labelControl15";
            this.labelControl15.Size = new Size(0x54, 13);
            this.labelControl15.TabIndex = 3;
            this.labelControl15.Text = "Chi ph\x00ed thực hiện:";
            this.labelControl13.Location = new Point(0x12, 0x12);
            this.labelControl13.Name = "labelControl13";
            this.labelControl13.Size = new Size(0x54, 13);
            this.labelControl13.TabIndex = 0;
            this.labelControl13.Text = "Số lượng dự kiến:";
            this.calQuantity.Location = new Point(0x6c, 15);
            this.calQuantity.Name = "calQuantity";
            this.calQuantity.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calQuantity.Size = new Size(60, 20);
            this.calQuantity.TabIndex = 1;
            this.groupControl5.Controls.Add(this.labelControl26);
            this.groupControl5.Controls.Add(this.labelControl27);
            this.groupControl5.Controls.Add(this.labelControl28);
            this.groupControl5.Controls.Add(this.calMoneyAllTotal);
            this.groupControl5.Controls.Add(this.calMoneyAllCompany);
            this.groupControl5.Controls.Add(this.calMoneyAllEmployee);
            this.groupControl5.Location = new Point(0x124, 0x2c);
            this.groupControl5.Name = "groupControl5";
            this.groupControl5.Size = new Size(0x115, 0x88);
            this.groupControl5.TabIndex = 7;
            this.groupControl5.Text = "Tổng chi ph\x00ed dự kiến";
            this.labelControl26.Appearance.Options.UseTextOptions = true;
            this.labelControl26.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl26.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl26.Location = new Point(9, 0x69);
            this.labelControl26.Name = "labelControl26";
            this.labelControl26.Size = new Size(0x59, 0x11);
            this.labelControl26.TabIndex = 4;
            this.labelControl26.Text = "Tổng tiền:";
            this.labelControl27.Appearance.Options.UseTextOptions = true;
            this.labelControl27.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl27.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl27.Location = new Point(10, 0x42);
            this.labelControl27.Name = "labelControl27";
            this.labelControl27.Size = new Size(0x7c, 0x17);
            this.labelControl27.TabIndex = 2;
            this.labelControl27.Text = "Số tiền c\x00f4ng ty hổ trợ:";
            this.labelControl28.Appearance.Options.UseTextOptions = true;
            this.labelControl28.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl28.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl28.Location = new Point(10, 0x1c);
            this.labelControl28.Name = "labelControl28";
            this.labelControl28.Size = new Size(0x7c, 0x16);
            this.labelControl28.TabIndex = 0;
            this.labelControl28.Text = "Số tiền nh\x00e2n vi\x00ean đ\x00f3ng:";
            this.calMoneyAllTotal.Location = new Point(140, 0x69);
            this.calMoneyAllTotal.Name = "calMoneyAllTotal";
            this.calMoneyAllTotal.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calMoneyAllTotal.Properties.DisplayFormat.FormatString = "{0}";
            this.calMoneyAllTotal.Properties.EditFormat.FormatString = "{0}";
            this.calMoneyAllTotal.Properties.Mask.UseMaskAsDisplayFormat = true;
            this.calMoneyAllTotal.Size = new Size(120, 20);
            this.calMoneyAllTotal.TabIndex = 5;
            this.calMoneyAllCompany.Location = new Point(140, 0x45);
            this.calMoneyAllCompany.Name = "calMoneyAllCompany";
            this.calMoneyAllCompany.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calMoneyAllCompany.Properties.DisplayFormat.FormatString = "{0}";
            this.calMoneyAllCompany.Properties.EditFormat.FormatString = "{0}";
            this.calMoneyAllCompany.Properties.Mask.UseMaskAsDisplayFormat = true;
            this.calMoneyAllCompany.Size = new Size(120, 20);
            this.calMoneyAllCompany.TabIndex = 3;
            this.calMoneyAllEmployee.Location = new Point(140, 30);
            this.calMoneyAllEmployee.Name = "calMoneyAllEmployee";
            this.calMoneyAllEmployee.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calMoneyAllEmployee.Properties.DisplayFormat.FormatString = "{0}";
            this.calMoneyAllEmployee.Properties.EditFormat.FormatString = "{0}";
            this.calMoneyAllEmployee.Properties.Mask.UseMaskAsDisplayFormat = true;
            this.calMoneyAllEmployee.Size = new Size(120, 20);
            this.calMoneyAllEmployee.TabIndex = 1;
            this.groupControl4.Controls.Add(this.labelControl25);
            this.groupControl4.Controls.Add(this.labelControl24);
            this.groupControl4.Controls.Add(this.labelControl14);
            this.groupControl4.Controls.Add(this.calMoneyOneTotal);
            this.groupControl4.Controls.Add(this.calMoneyOneCompany);
            this.groupControl4.Controls.Add(this.calMoneyOneEmployee);
            this.groupControl4.Location = new Point(9, 0x2c);
            this.groupControl4.Name = "groupControl4";
            this.groupControl4.Size = new Size(0x113, 0x88);
            this.groupControl4.TabIndex = 6;
            this.groupControl4.Text = "Chi ph\x00ed dự kiến cho một nh\x00e2n vi\x00ean";
            this.labelControl25.Appearance.Options.UseTextOptions = true;
            this.labelControl25.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl25.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl25.Location = new Point(12, 0x67);
            this.labelControl25.Name = "labelControl25";
            this.labelControl25.Size = new Size(0x56, 0x11);
            this.labelControl25.TabIndex = 4;
            this.labelControl25.Text = "Tổng tiền:";
            this.labelControl24.Appearance.Options.UseTextOptions = true;
            this.labelControl24.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl24.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl24.Location = new Point(12, 0x41);
            this.labelControl24.Name = "labelControl24";
            this.labelControl24.Size = new Size(0x7d, 0x13);
            this.labelControl24.TabIndex = 2;
            this.labelControl24.Text = "Số tiền c\x00f4ng ty hổ trợ:";
            this.labelControl14.Appearance.Options.UseTextOptions = true;
            this.labelControl14.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl14.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl14.Location = new Point(12, 0x1f);
            this.labelControl14.Name = "labelControl14";
            this.labelControl14.Size = new Size(0x7d, 0x16);
            this.labelControl14.TabIndex = 0;
            this.labelControl14.Text = "Số tiền nh\x00e2n vi\x00ean đ\x00f3ng:";
            this.calMoneyOneTotal.Location = new Point(0x8f, 0x67);
            this.calMoneyOneTotal.Name = "calMoneyOneTotal";
            this.calMoneyOneTotal.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calMoneyOneTotal.Properties.DisplayFormat.FormatString = "{0}";
            this.calMoneyOneTotal.Properties.EditFormat.FormatString = "{0}";
            this.calMoneyOneTotal.Properties.Mask.UseMaskAsDisplayFormat = true;
            this.calMoneyOneTotal.Size = new Size(0x77, 20);
            this.calMoneyOneTotal.TabIndex = 5;
            this.calMoneyOneCompany.Location = new Point(0x8f, 0x43);
            this.calMoneyOneCompany.Name = "calMoneyOneCompany";
            this.calMoneyOneCompany.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calMoneyOneCompany.Properties.DisplayFormat.FormatString = "{0}";
            this.calMoneyOneCompany.Properties.EditFormat.FormatString = "{0}";
            this.calMoneyOneCompany.Properties.Mask.UseMaskAsDisplayFormat = true;
            this.calMoneyOneCompany.Size = new Size(0x77, 20);
            this.calMoneyOneCompany.TabIndex = 3;
            this.calMoneyOneEmployee.Location = new Point(0x8f, 0x21);
            this.calMoneyOneEmployee.Name = "calMoneyOneEmployee";
            this.calMoneyOneEmployee.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calMoneyOneEmployee.Properties.DisplayFormat.FormatString = "{0}";
            this.calMoneyOneEmployee.Properties.EditFormat.FormatString = "{0}";
            this.calMoneyOneEmployee.Properties.Mask.UseMaskAsDisplayFormat = true;
            this.calMoneyOneEmployee.Size = new Size(0x77, 20);
            this.calMoneyOneEmployee.TabIndex = 1;
            this.xtraTabPage3.Controls.Add(this.groupControl6);
            this.xtraTabPage3.Controls.Add(this.labelControl18);
            this.xtraTabPage3.Controls.Add(this.labelControl16);
            this.xtraTabPage3.Controls.Add(this.labelControl17);
            this.xtraTabPage3.Controls.Add(this.txtPartnerPhone);
            this.xtraTabPage3.Controls.Add(this.txtPartnerName);
            this.xtraTabPage3.Controls.Add(this.txtPartnerAddress);
            this.xtraTabPage3.Name = "xtraTabPage3";
            this.xtraTabPage3.Size = new Size(0x242, 0x15d);
            this.xtraTabPage3.Text = "Đối T\x00e1c Thực Hiện";
            this.groupControl6.Controls.Add(this.labelControl23);
            this.groupControl6.Controls.Add(this.labelControl22);
            this.groupControl6.Controls.Add(this.txtPersonEmail);
            this.groupControl6.Controls.Add(this.labelControl19);
            this.groupControl6.Controls.Add(this.txtPersonPhone);
            this.groupControl6.Controls.Add(this.labelControl20);
            this.groupControl6.Controls.Add(this.labelControl21);
            this.groupControl6.Controls.Add(this.txtPersonPosition);
            this.groupControl6.Controls.Add(this.txtPersonName);
            this.groupControl6.Controls.Add(this.txtPersonAddress);
            this.groupControl6.Location = new Point(9, 0x5b);
            this.groupControl6.Name = "groupControl6";
            this.groupControl6.Size = new Size(560, 170);
            this.groupControl6.TabIndex = 6;
            this.groupControl6.Text = "Th\x00f4ng tin người li\x00ean hệ";
            this.labelControl23.Location = new Point(11, 0x60);
            this.labelControl23.Name = "labelControl23";
            this.labelControl23.Size = new Size(0x24, 13);
            this.labelControl23.TabIndex = 8;
            this.labelControl23.Text = "Địa chỉ:";
            this.labelControl22.Location = new Point(0xdb, 0x41);
            this.labelControl22.Name = "labelControl22";
            this.labelControl22.Size = new Size(0x1c, 13);
            this.labelControl22.TabIndex = 6;
            this.labelControl22.Text = "Email:";
            this.txtPersonEmail.Location = new Point(0xfd, 0x3e);
            this.txtPersonEmail.Name = "txtPersonEmail";
            this.txtPersonEmail.Size = new Size(0x11a, 20);
            this.txtPersonEmail.TabIndex = 7;
            this.labelControl19.Location = new Point(11, 0x41);
            this.labelControl19.Name = "labelControl19";
            this.labelControl19.Size = new Size(0x42, 13);
            this.labelControl19.TabIndex = 4;
            this.labelControl19.Text = "Số điện thoại:";
            this.txtPersonPhone.Location = new Point(0x4e, 0x3e);
            this.txtPersonPhone.Name = "txtPersonPhone";
            this.txtPersonPhone.Size = new Size(0x89, 20);
            this.txtPersonPhone.TabIndex = 5;
            this.labelControl20.Appearance.Options.UseTextOptions = true;
            this.labelControl20.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl20.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl20.Location = new Point(0x147, 0x20);
            this.labelControl20.Name = "labelControl20";
            this.labelControl20.Size = new Size(0x31, 0x13);
            this.labelControl20.TabIndex = 2;
            this.labelControl20.Text = "Chức vụ:";
            this.labelControl21.Appearance.Options.UseTextOptions = true;
            this.labelControl21.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl21.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl21.Location = new Point(11, 0x1d);
            this.labelControl21.Name = "labelControl21";
            this.labelControl21.Size = new Size(0x3d, 0x15);
            this.labelControl21.TabIndex = 0;
            this.labelControl21.Text = "Họ t\x00ean:";
            this.txtPersonPosition.Location = new Point(0x17e, 0x1f);
            this.txtPersonPosition.Name = "txtPersonPosition";
            this.txtPersonPosition.Size = new Size(0x99, 20);
            this.txtPersonPosition.TabIndex = 3;
            this.txtPersonName.Location = new Point(0x4e, 0x1f);
            this.txtPersonName.Name = "txtPersonName";
            this.txtPersonName.Size = new Size(0xf3, 20);
            this.txtPersonName.TabIndex = 1;
            this.txtPersonAddress.Location = new Point(0x4e, 0x5d);
            this.txtPersonAddress.Name = "txtPersonAddress";
            this.txtPersonAddress.Size = new Size(0x1c9, 0x41);
            this.txtPersonAddress.TabIndex = 9;
            this.labelControl18.Location = new Point(0x10, 0x31);
            this.labelControl18.Name = "labelControl18";
            this.labelControl18.Size = new Size(0x2d, 13);
            this.labelControl18.TabIndex = 4;
            this.labelControl18.Text = "Địa điểm:";
            this.labelControl16.Appearance.Options.UseTextOptions = true;
            this.labelControl16.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl16.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl16.Location = new Point(0x16a, 0x12);
            this.labelControl16.Name = "labelControl16";
            this.labelControl16.Size = new Size(0x48, 0x13);
            this.labelControl16.TabIndex = 2;
            this.labelControl16.Text = "Số điện thoại:";
            this.labelControl17.Appearance.Options.UseTextOptions = true;
            this.labelControl17.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl17.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl17.Location = new Point(0x10, 0x10);
            this.labelControl17.Name = "labelControl17";
            this.labelControl17.Size = new Size(0x3d, 0x15);
            this.labelControl17.TabIndex = 0;
            this.labelControl17.Text = "T\x00ean đối t\x00e1c:";
            this.txtPartnerPhone.Location = new Point(0x1b2, 0x12);
            this.txtPartnerPhone.Name = "txtPartnerPhone";
            this.txtPartnerPhone.Size = new Size(0x87, 20);
            this.txtPartnerPhone.TabIndex = 3;
            this.txtPartnerName.Location = new Point(0x53, 0x12);
            this.txtPartnerName.Name = "txtPartnerName";
            this.txtPartnerName.Size = new Size(0x112, 20);
            this.txtPartnerName.TabIndex = 1;
            this.txtPartnerAddress.Location = new Point(0x53, 0x2e);
            this.txtPartnerAddress.Name = "txtPartnerAddress";
            this.txtPartnerAddress.Size = new Size(0x1e7, 0x26);
            this.txtPartnerAddress.TabIndex = 5;
            this.labelControl12.Location = new Point(15, 0x188);
            this.labelControl12.Name = "labelControl12";
            this.labelControl12.Size = new Size(0x35, 13);
            this.labelControl12.TabIndex = 1;
            this.labelControl12.Text = "Trạng th\x00e1i:";
            this.cboStatus.EditValue = "L\x00ean kế hoạch";
            this.cboStatus.Location = new Point(0x4c, 0x184);
            this.cboStatus.Name = "cboStatus";
            this.cboStatus.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.cboStatus.Properties.Items.AddRange(new object[] { "L\x00ean kế hoạch", "Đang thực hiện", "Đ\x00e3 thực hiện" });
            this.cboStatus.Size = new Size(0xb0, 20);
            this.cboStatus.TabIndex = 2;
            this.cboStatus.TabStop = false;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.labelControl12);
            base.Controls.Add(this.xtraTabControl1);
            base.Controls.Add(this.cboStatus);
            base.Name = "xucWelfareAdd";
            base.Padding = new Padding(0, 2, 0, 0);
            base.Size = new Size(0x249, 0x1a7);
            base.Controls.SetChildIndex(this.cboStatus, 0);
            base.Controls.SetChildIndex(base.btnSaveNew, 0);
            base.Controls.SetChildIndex(base.btnSave, 0);
            base.Controls.SetChildIndex(base.btnCancel, 0);
            base.Controls.SetChildIndex(this.xtraTabControl1, 0);
            base.Controls.SetChildIndex(this.labelControl12, 0);
            ((ISupportInitialize) base.Err).EndInit();
            base.imageCollection2.EndInit();
            this.xtraTabControl1.EndInit();
            this.xtraTabControl1.ResumeLayout(false);
            this.xtraTabPage1.ResumeLayout(false);
            this.xtraTabPage1.PerformLayout();
            this.txtPurpose.Properties.EndInit();
            this.groupControl3.EndInit();
            this.groupControl3.ResumeLayout(false);
            this.groupControl3.PerformLayout();
            this.dtPerformFromDate.Properties.VistaTimeProperties.EndInit();
            this.dtPerformFromDate.Properties.EndInit();
            this.dtPerformToDate.Properties.VistaTimeProperties.EndInit();
            this.dtPerformToDate.Properties.EndInit();
            this.groupControl2.EndInit();
            this.groupControl2.ResumeLayout(false);
            this.groupControl2.PerformLayout();
            this.dtRegisterFromDate.Properties.VistaTimeProperties.EndInit();
            this.dtRegisterFromDate.Properties.EndInit();
            this.dtRegisterToDate.Properties.VistaTimeProperties.EndInit();
            this.dtRegisterToDate.Properties.EndInit();
            this.groupControl1.EndInit();
            this.groupControl1.ResumeLayout(false);
            this.groupControl1.PerformLayout();
            this.dtPrepareFromDate.Properties.VistaTimeProperties.EndInit();
            this.dtPrepareFromDate.Properties.EndInit();
            this.dtPrepareToDate.Properties.VistaTimeProperties.EndInit();
            this.dtPrepareToDate.Properties.EndInit();
            this.txtForm.Properties.EndInit();
            this.txtDescription.Properties.EndInit();
            this.txtName.Properties.EndInit();
            this.txtID.Properties.EndInit();
            this.txtLocation.Properties.EndInit();
            this.xtraTabPage2.ResumeLayout(false);
            this.xtraTabPage2.PerformLayout();
            this.calMoneyTotal.Properties.EndInit();
            this.calQuantity.Properties.EndInit();
            this.groupControl5.EndInit();
            this.groupControl5.ResumeLayout(false);
            this.calMoneyAllTotal.Properties.EndInit();
            this.calMoneyAllCompany.Properties.EndInit();
            this.calMoneyAllEmployee.Properties.EndInit();
            this.groupControl4.EndInit();
            this.groupControl4.ResumeLayout(false);
            this.calMoneyOneTotal.Properties.EndInit();
            this.calMoneyOneCompany.Properties.EndInit();
            this.calMoneyOneEmployee.Properties.EndInit();
            this.xtraTabPage3.ResumeLayout(false);
            this.xtraTabPage3.PerformLayout();
            this.groupControl6.EndInit();
            this.groupControl6.ResumeLayout(false);
            this.groupControl6.PerformLayout();
            this.txtPersonEmail.Properties.EndInit();
            this.txtPersonPhone.Properties.EndInit();
            this.txtPersonPosition.Properties.EndInit();
            this.txtPersonName.Properties.EndInit();
            this.txtPersonAddress.Properties.EndInit();
            this.txtPartnerPhone.Properties.EndInit();
            this.txtPartnerName.Properties.EndInit();
            this.txtPartnerAddress.Properties.EndInit();
            this.cboStatus.Properties.EndInit();
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        private void RaiseSuccessEventHander(HRM_WELFARE item)
        {
            if (this.Success != null)
            {
                this.Success(this, item);
            }
        }

        public void SetData(HRM_WELFARE item)
        {
            this.txtID.Text = item.WelfareCode;
            SYS_LOG.Insert("Ph\x00fac Lợi", "Xem", this.txtID.Text);
            if (base.m_Status == Actions.Update)
            {
                this.txtID.Properties.ReadOnly = true;
            }
            this.txtName.Text = item.WelfareName;
            this.txtDescription.Text = item.Description;
            this.txtForm.Text = item.Form;
            this.txtPurpose.Text = item.Purpose;
            this.txtLocation.Text = item.Location;
            this.dtPrepareFromDate.DateTime = item.PrepareFromDate;
            this.dtPrepareToDate.DateTime = item.PrepareToDate;
            this.dtRegisterFromDate.DateTime = item.RegisterFromDate;
            this.dtRegisterToDate.DateTime = item.RegisterToDate;
            this.dtPerformFromDate.DateTime = item.PerformFromDate;
            this.dtPerformToDate.DateTime = item.PerformToDate;
            this.cboStatus.SelectedIndex = item.Status;
            this.calQuantity.EditValue = item.Quantity;
            this.calMoneyTotal.EditValue = item.MoneyTotal;
            this.calMoneyOneEmployee.EditValue = item.MoneyOneEmployee;
            this.calMoneyOneCompany.EditValue = item.MoneyOneCompany;
            this.calMoneyOneTotal.EditValue = item.MoneyOneTotal;
            this.calMoneyAllEmployee.EditValue = item.MoneyAllEmployee;
            this.calMoneyAllCompany.EditValue = item.MoneyAllCompany;
            this.calMoneyAllTotal.EditValue = item.MoneyAllTotal;
            this.txtPartnerName.Text = item.PartnerName;
            this.txtPartnerPhone.Text = item.PartnerPhone;
            this.txtPartnerAddress.Text = item.PartnerAddress;
            this.txtPersonName.Text = item.PersonName;
            this.txtPersonPosition.Text = item.PersonPosition;
            this.txtPersonPhone.Text = item.PersonPhone;
            this.txtPersonEmail.Text = item.PersonEmail;
            this.txtPersonAddress.Text = item.PersonAddress;
        }

        private void txtID_EditValueChanged(object sender, EventArgs e)
        {
            TextEdit control = (TextEdit) sender;
            if (control.ErrorText != string.Empty)
            {
                base.Err.SetError(control, string.Empty);
            }
            if (base.m_Status == Actions.Add)
            {
                HRM_WELFARE hrm_welfare = new HRM_WELFARE();
                if (hrm_welfare.Exist(control.Text))
                {
                    base.Err.SetError(control, "M\x00e3 đ\x00e3 tồn tại.");
                    control.Focus();
                }
            }
        }

        protected override string uc_Change()
        {
            return string.Empty;
        }

        protected override string uc_Delete()
        {
            HRM_WELFARE item = new HRM_WELFARE {
                WelfareCode = this.txtID.Text
            };
            string str = item.Delete();
            if (str == "OK")
            {
                this.RaiseSuccessEventHander(item);
            }
            return str;
        }

        protected override string uc_Save()
        {
            if (MyRule.Get(MyLogin.RoleId, "bbiWelfare") != "OK")
            {
                return "";
            }
            if (!MyRule.AllowAdd)
            {
                MyRule.Notify();
                return "";
            }
            SYS_LOG.Insert("Ph\x00fac Lợi", "Th\x00eam", this.txtID.Text);
            base.SetWaitDialogCaption("Đang lưu dữ liệu...");
            Cursor.Current = Cursors.WaitCursor;
            HRM_WELFARE item = new HRM_WELFARE {
                WelfareCode = this.txtID.Text,
                WelfareName = this.txtName.Text,
                PrepareFromDate = this.dtPrepareFromDate.DateTime,
                PrepareToDate = this.dtPrepareToDate.DateTime,
                RegisterFromDate = this.dtRegisterFromDate.DateTime,
                RegisterToDate = this.dtRegisterToDate.DateTime,
                PerformFromDate = this.dtPerformFromDate.DateTime,
                PerformToDate = this.dtPerformToDate.DateTime,
                Purpose = this.txtPurpose.Text,
                Form = this.txtForm.Text,
                Description = this.txtDescription.Text,
                Location = this.txtLocation.Text,
                Quantity = Convert.ToInt32(this.calQuantity.EditValue.ToString()),
                Status = this.cboStatus.SelectedIndex,
                MoneyTotal = Convert.ToDecimal(this.calMoneyTotal.EditValue.ToString()),
                MoneyOneEmployee = Convert.ToDecimal(this.calMoneyOneEmployee.EditValue.ToString()),
                MoneyOneCompany = Convert.ToDecimal(this.calMoneyOneCompany.EditValue.ToString()),
                MoneyOneTotal = Convert.ToDecimal(this.calMoneyOneTotal.EditValue.ToString()),
                MoneyAllEmployee = Convert.ToDecimal(this.calMoneyAllEmployee.EditValue.ToString()),
                MoneyAllCompany = Convert.ToDecimal(this.calMoneyAllCompany.EditValue.ToString()),
                MoneyAllTotal = Convert.ToDecimal(this.calMoneyAllTotal.EditValue.ToString()),
                PartnerName = this.txtPartnerName.Text,
                PartnerPhone = this.txtPartnerPhone.Text,
                PartnerAddress = this.txtPartnerAddress.Text,
                PersonName = this.txtPersonName.Text,
                PersonPosition = this.txtPersonPosition.Text,
                PersonPhone = this.txtPersonPhone.Text,
                PersonEmail = this.txtPersonEmail.Text,
                PersonAddress = this.txtPersonAddress.Text
            };
            string text = item.Insert();
            if (text == "OK")
            {
                this.RaiseSuccessEventHander(item);
            }
            Cursor.Current = Cursors.Default;
            this.DoHide();
            if (text != "OK")
            {
                XtraMessageBox.Show(text, "Cảnh B\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            return text;
        }

        protected override string uc_Update()
        {
            if (MyRule.Get(MyLogin.RoleId, "bbiWelfare") != "OK")
            {
                return "";
            }
            if (!MyRule.AllowEdit)
            {
                MyRule.Notify();
                return "";
            }
            base.SetWaitDialogCaption("Đang cập nhật dữ liệu...");
            HRM_WELFARE item = new HRM_WELFARE {
                WelfareCode = this.txtID.Text,
                WelfareName = this.txtName.Text,
                PrepareFromDate = this.dtPrepareFromDate.DateTime,
                PrepareToDate = this.dtPrepareToDate.DateTime,
                RegisterFromDate = this.dtRegisterFromDate.DateTime,
                RegisterToDate = this.dtRegisterToDate.DateTime,
                PerformFromDate = this.dtPerformFromDate.DateTime,
                PerformToDate = this.dtPerformToDate.DateTime,
                Purpose = this.txtPurpose.Text,
                Form = this.txtForm.Text,
                Description = this.txtDescription.Text,
                Location = this.txtLocation.Text,
                Quantity = Convert.ToInt32(this.calQuantity.EditValue.ToString()),
                Status = this.cboStatus.SelectedIndex,
                MoneyTotal = Convert.ToDecimal(this.calMoneyTotal.EditValue.ToString()),
                MoneyOneEmployee = Convert.ToDecimal(this.calMoneyOneEmployee.EditValue.ToString()),
                MoneyOneCompany = Convert.ToDecimal(this.calMoneyOneCompany.EditValue.ToString()),
                MoneyOneTotal = Convert.ToDecimal(this.calMoneyOneTotal.EditValue.ToString()),
                MoneyAllEmployee = Convert.ToDecimal(this.calMoneyAllEmployee.EditValue.ToString()),
                MoneyAllCompany = Convert.ToDecimal(this.calMoneyAllCompany.EditValue.ToString()),
                MoneyAllTotal = Convert.ToDecimal(this.calMoneyAllTotal.EditValue.ToString()),
                PartnerName = this.txtPartnerName.Text,
                PartnerPhone = this.txtPartnerPhone.Text,
                PartnerAddress = this.txtPartnerAddress.Text,
                PersonName = this.txtPersonName.Text,
                PersonPosition = this.txtPersonPosition.Text,
                PersonPhone = this.txtPersonPhone.Text,
                PersonEmail = this.txtPersonEmail.Text,
                PersonAddress = this.txtPersonAddress.Text
            };
            string text = item.Update();
            if (text == "OK")
            {
                this.RaiseSuccessEventHander(item);
            }
            if (text != "OK")
            {
                XtraMessageBox.Show(text, "Cảnh B\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            this.DoHide();
            return text;
        }

        public delegate void SuccessEventHander(object sender, HRM_WELFARE item);
    }
}

